﻿@using LynxWiki.DomainModel;
@using LynxWiki;

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>@ViewBag.Title - LynxWiki</title>
        <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
        <link rel="canonical" href="@Request.Url.ToString()" />
        <meta name="viewport" content="width=device-width" />
        @Styles.Render("~/Content/css")
        @Scripts.Render("~/bundles/syntaxhighlighter")
        @Styles.Render("~/Content/SyntaxHighlighter/css")
        @Scripts.Render("~/bundles/modernizr")
        @Scripts.Render("~/bundles/jsMath")
    	<script type="text/javascript">SyntaxHighlighter.all();</script>
    </head>
    <body>
        <header>
            <div class="content-wrapper">
                <div class="float-left">
                    <img src="~/Images/120px-Canadian_Lynx_side_head.png" alt="Lynx side head" class="imgLynx" /><p class="site-title">  @Html.ActionLink("LynxWiki", "Index", "Home", null, new { @class = "logo" })</p>
                    <div id="applicationDtl">@ViewBag.Application</div>
                </div>
                <div class="float-right">
                    <section id="login">
                        @Html.Partial("_LoginPartial")
                    </section>
                    <nav>
                    @Html.TabbedMenu( (List<MenuTab>)ViewBag.TabbedMenuList )
                    </nav>
                </div>
            </div>
        </header>
        <div id="body">
            <div class="float-left">
                <section id="wikilinks">
                    @Html.Partial("_WikiLinks")
                </section>
                <section id="tagCloud">
                    @Html.Partial("_TagCloud", (TagCloud)ViewBag.TagCloud)
                </section>                                      
                <section id="googleAd">
                    @Html.Partial("GoogleAdHigh")
                </section>
            </div>
            @RenderSection("featured", required: false)
            <section class="content-wrapper main-content clear-fix">
                @RenderBody()
            </section>
        </div>
        <footer>
            <div class="content-wrapper">
                <div class="float-left">
                    <p>&copy; @DateTime.Now.Year - <a href="mailto:jwdavidson@gmail.com" >John W Davidson</a></p>
                    <p>@Html.ActionLink("Privacy", "Privacy", "Home") | @Html.ActionLink("Terms", "Terms", "Home")</p>
           @*       <section id="googleAdBottom">
                        @Html.Partial("GoogleAdBottom")
                    </section>                              *@
                </div>
            </div>
        </footer>

        @Scripts.Render("~/bundles/jquery")
        @Scripts.Render("~/bundles/jqueryui")
        @Scripts.Render("~/bundles/TopicTip")
        @RenderSection("scripts", required: false)
        <script type="text/javascript">
            $(document).ready(function () {

                $("#TopicForm").keypress(function (e) {
                    var kcode = e.keyCode || e.charCode
                    if (kcode == 13) {
                        var defaultbtn = $(this).attr("DefaultButton");
                        $("#" + defaultbtn).click();
                        return false;
                    }
                });
                $("#DynamicTopicBar").hide();
                $("#TopicBar").mouseover(function () {
                    $(this).addClass("TopicBarHover");
                });
                $("#TopicBar").mouseout(function () {
                    $(this).removeClass("TopicBarHover");
                });
                $("#TopicBar").click(function () {
                    if ($("#StaticTopicBar").css("display") == "block") {
                        $("#StaticTopicBar").hide();
                        $("#DynamicTopicBar").show();
                        $("#TopicBarInputBox").focus();
                    }
                });
                $("#CancelDynamicTopicBar").click(function () {
                    $("#StaticTopicBar").show();
                    $("#DynamicTopicBar").hide();
                    return false;
                });
                jsMath.Process(document);
                $(".Answer").hide();
                $(".FAQ").click(function () {
                    $(this).children(".Answer").toggle();
                });
                $("#toggleContent").click(function () {
                    if ($("#toggleContent").text() == "show") {
                        $("#toggleContent").text("hide");
                    }
                    else {
                        $("#toggleContent").text("show");
                    }
                    $(".tableOfContentList").toggle(400);
                });
            });
        </script>
    </body>
</html>
